//
//  DataStore.h
//  ViewPoint
//
//  Created by Demiao Lin on 09-2-23.
//  Copyright 2009 Tsinghua. All rights reserved.
//



@class FMDatabase;
@class Board;

@interface DataStore : NSObject {
	FMDatabase* db;
}

-(id) init;
-(Board*) getBoardWithName:(NSString*)board_name;
-(void) addBoard:(Board*)board;
-(void) addBoard:(NSString*)board_name bid:(NSInteger*)board_id desc:(NSString*)description;

-(void) putValue:(NSString*)value withKey:(NSString*) key;
-(void) removeValueWithKey:(NSString*) key;
-(NSString*) getValueWithKey:(NSString*) key;

-(void) saveFavouriteBoards:(NSMutableArray*)boards;
-(NSMutableArray*) getFavouriteBoards;

-(NSString*) dataFilePath;

-(void) checkConnection;
-(void) open;
-(void) close;

-(void) initialize;

@end
